home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 09 Application Software / LOGFIL.DOC < prev    next >
Text File  |  2019-04-13  |  15KB  |  328 lines

  1.               
  2.  
  3.  
  4. DOCUMENTATION FOR LOGFILE v. 1.0a
  5. (May be freely copied for personal or classroom use; other use requires
  6. author permission)
  7.  
  8.  
  9. 1.0  Contents of This File
  10.  
  11.      1.1  Capsule Specifications
  12.      1.2  Minimum equipment required
  13.      1.3  Features
  14.      2.1  First Words
  15.      2.2  Program Overview
  16.      3.0  Getting Started
  17.      3.1  How Many Records?
  18.      3.2  Connect-time Rates
  19.      3.3  Choosing a Filename
  20.      3.4  Use Code Option
  21.      4.0  Adding Records
  22.      5.0  Searching Records
  23.      6.0  Report Generator
  24.      6.1  Printer Support
  25.      7.0  Program Crashes
  26.      7.1  Killing Relative Files
  27.      8.0  Translation to Other Computers
  28.      9.0  Program Alterations
  29.  
  30. -------------------------------------------------------------------------------
  31.  
  32. 1.1  Capsule Specifications
  33.  
  34. File size:  720 records
  35. Record length:  254 characters and spaces; present format is 33
  36.  
  37. Purpose:  To allow user to manage on-line connect times, uses, and
  38. charges, while demonstrating the use of relative files and keylists.
  39.  
  40. 1.2  Minimum equipment required:
  41.  
  42.      C-64 computer
  43.      1540/1541 disk drive
  44.      Printer optional
  45.  
  46. 1.3  Features:
  47.  
  48.      Real-time clock display on main menu.
  49.      Search keyfield using all relational operators--plus
  50. range--reduced to alpha-character mnemonics (>= becomes GE).
  51.      Sequential keylist retrieves relative file records, with good
  52. execution speed.
  53.      Keylist 'remembers' certain creation parameters, including date and
  54. time of last update.
  55.      Retrieved data is plugged into pre-defined screen for reading.
  56.      Prepares report with totals; may be either displayed to screen or
  57. printed.
  58.      File status display from main menu of records used/available.
  59.      Extensive input error-checking with entry restrictions.
  60.      Modified 'get' statement with blinking cursor.
  61.      Date & time string manipulation routines.
  62.      Formal exit routine.
  63.      User friendly and virtually transparent operation for
  64. non-programmer.
  65.  
  66. 2.1  First Words
  67.  
  68.      Several terms are used in this text file with which you should be
  69. familiar.
  70.  
  71. FIELD:  A record 'blank space' reserved for an item of information.  In
  72. relative files, the 1540/1541 disk operating system (DOS) dictates that
  73. one may have any number of fields provided the total of field lengths and
  74. separating characters or spaces does not exceed 254.
  75.  
  76. FILE:  The cabinet; not the manila folder.  In Logfile--indeed, in all
  77. relative files--the user establishes a particular 'cabinet' into which he or
  78. she proposes to put individual records.  The filename labels the 'cabinet.'
  79.  
  80. KEY:  The information stored in a keyfield.
  81.  
  82. KEYFIELD:  Normally the field into which the most important item of common
  83. identification is entered, as, a customer name.  Ask yourself, 'By what
  84. field would I usually file this record?'
  85.  
  86. KEYLIST:  A sequential file of all the individual-record keyfields.  In
  87. Logfile, by counting the keyfield sequence, keyfield x corresponds to
  88. relative record x.
  89.  
  90. RECORD:  Think medical records.  The individual file folder within the file
  91. cabinet.  May be an empty folder, or may contain information.  Our cabinet
  92. may contain up to 720 records.  Beyond that, we'll need another file cabinet.
  93.  
  94. SEARCH:  In Logfile, using a specified date, or range of dates, plus the
  95. relational operators (=, <>, etc.) to attempt a match to an item in the
  96. keylist.  If the match is successful, the key's position in the sequential
  97. file dictates which corresponding full record is retrieved.
  98.  
  99.  
  100. 2.2  Program Overview
  101.  
  102.      Logfile is a relative file and keylist generator, for the C-64 and
  103. 1540/1541 disk system, formatted to keep track of on-line connect times and
  104. charges.
  105.  
  106.      Some months ago, your humble author realized, with shock, that not
  107. every computer owner is interested in programming.  Logfile attempts to shed
  108. some light on what seems to be a neglected area of C-64/1541 literature,
  109. the relative file.  Those few demonstration programs we have seen
  110. appear to relegate their users to remembering record numbers, or to
  111. relying on an exact and equal match with the field in question.  There is
  112. no question that the equipment will support much more sophisticated
  113. operations than these, but no one has taken the time to tell the beginning or
  114. intermediate BASIC programmer how to proceed.
  115.  
  116.      Besides, BASIC is too slow for database management!  Well, how slow is
  117. 'too' slow?  We have the good fortune to own a commercial software package
  118. for the above equipment that will locate and display a record within
  119. three seconds, regardless of file size! Sure, it was written in machine
  120. language, but it also uses keylists.  We submit that the keylist may be an
  121. excellent tool even for a database program in BASIC.  Using a keylist,
  122. Logfile's retrieval speed may even surprise you!
  123.  
  124.  
  125. 3.0  Getting Started
  126.  
  127.      If you plan to use Logfile for its pre-formatted purpose, all you need
  128. do is load a working copy by entering the usual direct command, load
  129. "filename",8.  Then run.  We strongly advise you to preserve a master copy,
  130. and work from copies of that.
  131.  
  132.      After the initial screen, enter the date and time in the formats
  133. specified.  This feature sets the main menu real-time clock and is further
  134. used to date-and-time stamp your reports, as well as to record the date
  135. of keylist updates.  The main menu display is your route to other features
  136. of the program.
  137.  
  138. 3.1  How Many Records?
  139.  
  140.      Before creating a new file, some thought should be given to the amount
  141. of data you may already have, or will be generating.  For example, if you
  142. merely access CompuServe three times each week to send and read EMAIL, and
  143. want to keep track of your times and charges for a year, you will only need
  144. to 'declare' 156 records for the file.  The major reason for doing things
  145. this way is to increase search speed.  There is no need to declare a
  146. maximum of 720 records in a particular file if you aren't going to use them.
  147.  
  148. 3.2  Connect-time Rates
  149.  
  150.      Another option is how you wish Logfile to deal with connect-time
  151. rates.  The program will accept and identify a constant rate, as, 06.00 for
  152. $6 per hour.  It will also accept a variable rate that may change as you
  153. build the file.  In the first case, you will not be prompted for the rate in
  154. each record since you are telling the computer the rate will not change.  The
  155. latter option asks for the rate in each record you enter.  The program will
  156. 'remember' which option you chose, for your next session with that file.
  157.  
  158.      A word of caution.  While eliminating all but letters, numbers,
  159. and some punctuation, our modified 'get' statement will accept punctuation
  160. other than the decimal point without error detection, as, the colon for time
  161. strings.  The prompts will always tell you which separator or punctuation to
  162. use.  In the rate case, any punctuation other than a decimal will scramble
  163. later calculations.
  164.  
  165. 3.3  Choosing a Filename
  166.  
  167.      Since you are already acquainted with a massive information service that
  168. has a fetish for proper filenames, this should be easy.  Most often, the name
  169. of the on-line service is adequate.  Be aware, however, that upper and lower
  170. case are significant.  If you originally enter 'DowJonesNS,' and
  171. later call for 'dowjonesns,' you'll get a 'file not found' error.  Logfile
  172. limits you to a maximum of twelve characters and spaces, to have room for
  173. its own automatic extensions.  The keylist will appear in your disk
  174. directory as 'filename.key.'  The relative file will appear as
  175. 'filename.dat.'  This way, the pairs of matched filenames reflect their
  176. purpose, and may co-exist on the same disk.  Do not add these extensions; let
  177. the computer handle that for you.
  178.  
  179.      Logfile prompts you for a filename before executing any main menu
  180. operation so that, in addition to providing some internal requirements,
  181. you may choose, if you wish, another file.
  182.  
  183.      After the two files have been created, the only option is returning
  184. to the main menu.  To verify that your files are on the disk, select the file
  185. status display.
  186.  
  187. 3.4  Use Code Option
  188.  
  189.      Before adding records to your newly-created file, determine which
  190. personal use codes you may want to use.  The program allows three characters
  191. for this.  For example, if you invested 00:17 minutes searching public access
  192. for a discussion of keylists, ultimately downloading this text file,
  193. the code might be 'acc' (for access), or 'dow' (for download).  Similarly,
  194. the cb simulator might appear as 'cbs.'
  195.  
  196. 4.0  Adding Records
  197.  
  198.      Upon choosing this menu item and calling for the file, the screen will
  199. display a blank record, properly labelled with the filename, and advise
  200. this is 'record nmbr: 1.'  Data entry is simple enough, with the aid of a
  201. blinking cursor and specific prompts.  When one field is properly filled, the
  202. cursor will move to the next.  If you elected to use a constant for the
  203. connect time, this field will be filled by the computer (in light blue
  204. characters on a color monitor or color tv).  The charge calculation is also
  205. automatic, leaving the use code.  When this field is filled, the 'save'
  206. prompt will flash.  You may save the record, delete the record, or quit the
  207. add mode, as you prefer.  Pressing 's' or 'S,' and that letter only will save
  208. the record.  Following a successful save, a new prompt will appear in the
  209. command area under the record format, 'SPC enter next.'  Press the space bar
  210. to display the next blank record, and continue as before.
  211.  
  212. 5.0  Searching Records
  213.  
  214.      If this program has any real power, it surfaces here.  After calling
  215. for the file, you are given the option of searching by record number (nothing
  216. more than specifying a specific record for retrieval), or searching by our
  217. pre-designated keyfield.  Of the fields in Logfile's present format, only the
  218. date made any sense as a keyfield, although another is possible with a few
  219. modifications.  Similarly, a sort routine was not included since your
  220. records will most likely be entered sequentially by date, in effect
  221. pre-sorting the file.  Selecting the key option displays the available
  222. search relational operators.
  223.  
  224.      We have elected to use FORTRAN-like mnemonics for these
  225. operators intead of the usual symbols, to add to our user-friendly image.
  226. The object here is to apply a relationship test to the sought-for key.
  227. The proposed key may or may not exist; hence, the search facility.
  228.  
  229.      For example, suppose that in combating lonliness (for whatever
  230. reason), you remember spending a lot of time on the cb simulator between the
  231. time your cat died, and Christmas day.  The cat expired about mid-November.
  232. Therefore, you need to retrieve all records between 84/11/15 and 84/12/25.
  233. This is a 'range' relationship.  Enter 'rg' or 'RG' (case inversion is never
  234. significant in Logfile commands).
  235.  
  236.      We have, however, used little error-checking with the standard input
  237. statement.  If the program doesn't recognize your input (say you entered
  238. 'rn'), the computer will simply sail through your keylist, searching for an
  239. impossible relationship, to 'end of keylist: no match found'.  Press 's' to
  240. try again.
  241.  
  242.      The program will prompt for the lowest key in the range, and then the
  243. highest key, and then retrieve the first record in the range, if one
  244. exists, and display it for reading.  Press 'n' to read the next record in
  245. the range.
  246.  
  247. 6.0  Report Generator
  248.  
  249.      More useful, perhaps, is displaying to the screen, or printing
  250. hardcopy of, the results of your search.  Rather than reading individual
  251. records, this main menu option totals the time and charge columns below
  252. fields of all the records that comprise that particular report.  You may also
  253. prepare a report of all the records in the file, if you wish.  Display or
  254. print 'selected records' on the secondary 'Report Option Menu' searches
  255. for specific records.
  256.  
  257. 6.1  Printer Support
  258.  
  259.      Logfile assumes a Commodore MPS-801 printer, and sets the printer
  260. secondary address to '7' (cursor down or 'business mode,' upper and lower
  261. case) in line 1545 of the program.  If this is incompatible with your
  262. printer, first determine the proper secondary address for upper and lower case
  263. (try the instruction book), and change the final digit in the program line in
  264. question.  Non-CBM printers may require other measures.
  265.  
  266. 7.0  Program Crashes
  267.  
  268.      Although Logfile devotes altogether too many blocks to
  269. error-checking and recovery, it is possible to crash the program.  In the
  270. event you get a BASIC error message during a read/write operation, and the
  271. activity light on your disk drive remains steady red, followed by 'ready'
  272. and a blinking cursor, enter in direct mode, 'close5:close2:close1.'  If your
  273. position in the program has involved printer operations, add 'close7' to the
  274. above line.  The red light should go out, and your open files should be
  275. properly closed.
  276.  
  277. 7.1  Killing Relative Files
  278.  
  279.      If, for any reason, you need to scratch a relative file from your disk
  280. (outside of the Logfile environment), you may not use the save with replace
  281. command '@0:.'  The file must be scratched using 'S0:.'
  282.  
  283. 8.0  Translation to Other Computers
  284.  
  285.      The limitations of v. 2.0 BASIC have dictated that Logfile use over 14K
  286. to get in all the error checking routines and screen format.  A better
  287. programmer could and should shave this somewhat.  The same programmer could
  288. doubtless accomplish the same ideas on, say, the Mod 100 in 8K or less, given
  289. a disk drive, particularly with a little help from 'on error goto' and 'print
  290. @.'  Did you hear that, Commodore?
  291.  
  292.      The only major routine in Logfile using machine-specific addresses is the
  293. blinking cursor with 'get,' and a peek to return the physical line number of
  294. the cursor in the report display routine.  CBM-specific syntax, of
  295. course, is used in dealing with the disk drive, although all systems have
  296. an equivalent.  Cosmetics may be ignored.
  297.  
  298. 9.0  Program Alterations
  299.  
  300.      Serious modifications to Logfile could only be dictated by the condition
  301. of having more time than software money, or a serious interest in
  302. programming.  We readily concede that a number of commercial database programs
  303. will do the job faster and better, with many more features.
  304.  
  305.      For this reason, we cannot justify uploading a much longer series of text
  306. files telling one what to do and how to do it, without an invitation from a
  307. sig sysop, and some positive feedback from actual users.
  308.  
  309.      Following our sometimes convoluted logic, however, and multiple passes
  310. through main routines from all four corners, may prove to be more than all
  311. but the most dedicated can endure.
  312.  
  313.      In the meantime, these detailed instructions are available on disk for
  314. the now traditional copy fee of $3, plus a blank formatted disk, and
  315. self-addressed stamped disk mailer.  Please specify preference of text
  316. format: Speedscript document, 
  317.                 , or true ASCII.
  318.  
  319.      If you find bugs, or run into modification snags, use EMAIL.  We'll
  320. send an advance thank you for bug swatting, and a prompt response on other
  321. matters.
  322.  
  323.  
  324. Mike Davidson  74116,2507
  325. 11845-5th Ave S
  326. Seattle, WA  98168
  327.  
  328.